package ui.mainscreen.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ui.mainscreen.LoadPanel;
import ui.mainscreen.MenuPanel;

/**
 * Слушатель панели Загрузок
 * 
 * @author Anton
 */
public class LoadPanelListener implements ActionListener {

	private LoadPanel load;
	private MenuPanel menuPanel;

	public LoadPanelListener(LoadPanel load, MenuPanel menuPanel) {
		this.load = load;

		this.menuPanel = menuPanel;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		load.setVisible(false);
		menuPanel.menuCreatorButton.setEnabled(true);
		menuPanel.menuOptionButton.setEnabled(true);
		menuPanel.menuNewButton.setEnabled(true);
		menuPanel.menuExitButton.setEnabled(true);
		menuPanel.menuLoadButton.setEnabled(true);

	}

}
